package com.daka.service.impl;

import com.daka.dao.MemberInviteDao;
import com.daka.entity.MemberInvite;
import com.daka.service.MemberInviteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by yangx
 * CreateTime: 2016/12/24 8:34
 */
@Service("memberInviteService")
@Transactional
public class MemberInviteServiceImpl implements MemberInviteService {
    @Autowired
    private MemberInviteDao memberInviteDao;

    @Override
    public int insert(MemberInvite record) {
        return memberInviteDao.insert(record);
    }

    @Override
    public MemberInvite selectByPrimaryKey(Integer id) {
        return memberInviteDao.selectByPrimaryKey(id);
    }

    @Override
    public MemberInvite selectByInviteCode(String code) {
        return memberInviteDao.selectByInviteCode(code);
    }

    @Override
    public List<MemberInvite> selectByMember(String memberID) {
        return memberInviteDao.selectByMember(memberID);
    }

    @Override
    public int updateByPrimaryKeySelective(MemberInvite record) {
        return memberInviteDao.updateByPrimaryKeySelective(record);
    }
}
